//
// Created by tanzx on 12/21/0021.
//
#include <iostream>
#ifndef UNTITLED_OVERRIDE_FUNCTION_H
#define UNTITLED_OVERRIDE_FUNCTION_H
using namespace std;
class Base
{
public:
    Base()
    {
        init();
    }
    virtual ~Base() {}
public:
    virtual void do_init()
    {
        init();
    }
protected:
    virtual void init() {
        cout << "in Base::init()" << endl;
    }
};
class Derived : public Base
{
public:
    Derived()
    {
        init();
    }
protected:
    void init() {
        cout << "in Derived::init()" << endl;
    }
};
void test_override_function();
#endif //UNTITLED_OVERRIDE_FUNCTION_H
